package xormplus

import (
	"gitee.com/hongzhaomin/hzm-common-go/easylog"
	"log/slog"
	"sync/atomic"
)

var xormplusLog atomic.Pointer[easylog.Logger]

func init() {
	SetLogger(easylog.NewDefaultLogger(slog.LevelInfo))
}

func SetLogger(logger easylog.Logger) {
	xormplusLog.Store(&logger)
}

func logger() easylog.Logger {
	return *xormplusLog.Load()
}
